<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta name="description" content="">
    <meta name="author" content="Mark Otto, Jacob Thornton, and Bootstrap contributors">
    <meta name="generator" content="Jekyll v4.0.1">
    <title>Dashboard</title>

    <link rel="canonical" href="https://getbootstrap.com/docs/4.5/examples/dashboard/">

    <!-- Bootstrap core CSS -->
<link href="/assets/dist/css/bootstrap.css" rel="stylesheet">

    <style>
      .bd-placeholder-img {
        font-size: 1.125rem;
        text-anchor: middle;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      @media (min-width: 768px) {
        .bd-placeholder-img-lg {
          font-size: 3.5rem;
        }
      }
    </style>
    <!-- Custom styles for this template -->
    <link th:href="@{/tcr/dashboard.css}" rel="stylesheet">
  </head>
  <body>
  <div th:replace="common/bar::topbar"></div>

<div class="container-fluid">
  <div class="row">
   <div th:replace="common/bar::sidebar(activeUri='exe')"></div>

    <main role="main" class="col-md-9 ml-sm-auto col-lg-10 px-md-4">
    <div class="row-cols-12">
    <form class="form-horizontal" method="post" th:action="@{/tcr/exeEdit}">
      <input type="hidden" name="_method" value="put" th:if="${exercise!=null}">
      <input type="hidden" name="id" th:value="${exercise.getId()}" th:if="${exercise!=null}">
      <div class="form-group">
        <label for="inputName" class="col-sm-2 control-label">Student</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" id="inputName" th:name="studentName" placeholder="学生名字" th:value="${exercise!=null&&exercise.student!=null}?${exercise.student.getName()}">
        </div>
      </div>
      <div class="form-group">
        <label for="inputPhone" class="col-sm-2 control-label">Teacher</label>
        <div class="col-sm-10">
          <input type="text" class="form-control" readonly id="inputPhone" th:name="teacherName" placeholder="教练名字" th:value="${exercise!=null&&exercise.teacher!=null}?${exercise.teacher.name}">
            <p style="color:#5a6268;">如需修改，请到个人主页修改，或联系管理员</p>
        </div>
      </div>
      <!--<div class="form-group">-->
        <!--<div class="col-sm-offset-2 col-sm-10">-->
            <!--<label for="inputPhone" class="col-sm-2 control-label radio-inline">Sex</label>-->
            <!--<div class="col-sm-10">-->
              <!--<input type="radio" th:value="男" th:name="sex" th:checked="${exercise!=null}?${exercise.getSex()=='男'}:'false'">男-->
              <!--<input type="radio" th:value="女" th:name="sex" th:checked="${exercise!=null}?${exercise.getSex()=='女'}:'false'">女-->
            <!--</div>-->
        <!--</div>-->
      <!--</div>-->
      <div class="form-group">
        <div class="col-sm-offset-2 col-sm-10">
          <div class="checkbox">
            <label>
              ExerciseDate<br>
              <input type="date" class="form-control" th:name="exersiseDate" th:value="${exercise!=null}?${#dates.format(exercise.getExerciseDate(),'yyyy-MM-dd')}">
                <input type="time" class="form-control" th:name="exersiseTime" th:value="${exercise!=null}?${#strings.substring(exercise.getExerciseDate(),11)}">
                     <!--th:value="${exercise!=null}?${#dates.format(exercise.getEnterDate(),'yyyy-MM-dd')}">-->
            </label>
          </div>
        </div>
      </div>
        <div class="form-group">
            <label for="inputPhone" class="col-sm-2 control-label">ExerciseLength</label>
            <div class="col-sm-10">
                <input type="text" class="form-control"  th:name="exerciseLength" placeholder="时长" th:value="${exercise!=null}?${exercise.exerciseLength}">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-2 control-label radio-inline">Present</label>
            <div class="col-sm-10">
                <input type="radio" th:value="true" th:name="present" th:checked="${exercise.present}">到场
                <input type="radio" th:value="false" th:name="present" th:checked="${exercise.present==false}">未到场
            </div>
        </div>
      <!--<div class="form-group">-->
        <!--<div class="col-sm-offset-2 col-sm-10">-->
          <button type="submit" class="btn btn-sm btn-info"><span style="color: white" th:text="${exercise!=null}?'修改':'添加'"></span></button>
        <!--</div>-->
      <!--</div>-->
    </form>
    </div>

    </main>
  </div>
</div>
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
      <script>window.jQuery || document.write('<script src="../assets/js/vendor/jquery.slim.min.js"><\/script>')</script><script src="/assets/dist/js/bootstrap.bundle.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/feather-icons/4.9.0/feather.min.js"></script>
        <script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.min.js"></script>
        <script src="/tcr/dashboard.js"></script></body>
</html>
